import Vue from 'vue';
import VueRouter, { RouteConfig } from 'vue-router';
import { Login } from '../views/Login';
import { Index } from '../views/Index';
import { AuthonticationIndex } from '../layout/Authtication';
import { NOAuthonticationIndex } from '../layout/NoAuthtication';
import { ShowModule } from '../views/ShowModule';

Vue.use(VueRouter);

const routes: RouteConfig[] = [
	{
		path: '/login',
		name: 'login',
		component: Login,
	},
	{
		path: '',
		name: 'index',
		component: AuthonticationIndex,
		children: [
			{
				path: 'ShowModule',
				name: 'ShowModule',
				component: ShowModule,
			},
		],
	},
];

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes,
});

export default router;
